﻿package com.rbac.system.mapper;

import com.rbac.system.entity.RolePermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RolePermissionMapper {
    
    int insert(RolePermission rolePermission);
    
    int deleteById(Long id);
    
    int deleteByRoleId(Long roleId);
    
    int deleteByPermissionId(Long permissionId);
    
    RolePermission selectById(Long id);
    
    List<RolePermission> selectByRoleId(Long roleId);
    
    List<RolePermission> selectByPermissionId(Long permissionId);
    
    List<RolePermission> selectByRoleIds(@Param("roleIds") List<Long> roleIds);
    
    List<RolePermission> selectList(@Param("rolePermission") RolePermission rolePermission);
} 

